<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/11/17
 * Time: 16:57
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\business;

use app\common\model\mysql\Service as ModelObj;
use app\common\validate\Service as ValObj;
use think\Exception;

class Service extends Base
{
    protected $valObj = null;
    protected $modelObj = null;

    public function __construct()
    {
        $this->valObj = new ValObj();
        $this->modelObj = new ModelObj();
    }

    public function getServiceByList()
    {
        try {
            $lists = $this->modelObj->getServiceByList();
        } catch (\Exception $e) {
            throw new Exception("内部错误");
        }
        return $lists;
    }

    public function getServiceByIds(array $ids = [])
    {
        try {
            $lists = $this->modelObj->getServiceByIds($ids);
        } catch (\Exception $e) {
            throw new Exception("查询失败");
        }
        return $lists;
    }
}